<?php

namespace App\Models\Enum;

/**
 * 游戏动作
 */
class ActionDef
{
    const ENTER_URL = '1';
    const SDK_LOGIN = '2';
    const ENTER_LOGIN_UI = '3';
    const CLICK_LOGIN = '4';
    const ENTER_CREATE_UI = '5';
    const HAS_CREATE = '6';
    const ENTER_GAME = '7';

    public static function get($type)
    {
        switch ($type) {
            case self::ENTER_URL:
                return '点击icon';
            case self::SDK_LOGIN:
                return 'SDK登录';
            case self::ENTER_LOGIN_UI:
                return '进入登录界面';
            case self::CLICK_LOGIN:
                return '点击登录按钮';
            case self::ENTER_CREATE_UI:
                return '进入创角界面';
            case self::HAS_CREATE:
                return '创角成功';
            case self::ENTER_GAME:
                return '进入游戏';
            default:
                return '类型未定义';
        }
    }

    public static function getAll()
    {
        return [
            self::ENTER_URL => self::get(self::ENTER_URL),
            self::SDK_LOGIN => self::get(self::SDK_LOGIN),
            self::ENTER_LOGIN_UI => self::get(self::ENTER_LOGIN_UI),
            self::CLICK_LOGIN => self::get(self::CLICK_LOGIN),
            self::ENTER_CREATE_UI => self::get(self::ENTER_CREATE_UI),
            self::HAS_CREATE => self::get(self::HAS_CREATE),
            self::ENTER_GAME => self::get(self::ENTER_GAME),
        ];
    }
}